package com.demo2do.fms.entity.supplier.common;

import org.apache.commons.lang3.StringUtils;

import com.demo2do.core.utils.Alias;

/**
 * 业务类型
 *
 * @author Ark
 *
 */
@Alias("SupplierBusinessType")
public enum BusinessType {

    TYPE_01("01", "离地运输", "motor", "运输"),
    
    TYPE_02("02", "地跑运输", "motor", "运输"),
    
    TYPE_03("03", "水铁运输", "motor", "运输"),
    
    TYPE_04("04", "仓储管理", "storage", "仓储"),
    
    TYPE_05("05", "车辆检查", "storage", "仓储"),
    
    TYPE_06("06", "短驳驾驶", "storage", "仓储"),
    
    TYPE_07("07", "PDI", "storage", "仓储"),


    TYPE_08("08", "动态维护", "storage", "仓储"),
    
    TYPE_09("09", "洗车", "storage", "仓储"),
    
    TYPE_11("11", "维修", "storage", "仓储"),

    TYPE_12("12", "一般仓储", "commonStorage", "一般仓储"),

    TYPE_13("13", "报关商检", "storage", "仓储");
    
    private String code;
    
    private String description;
    
    private String type;
    
    private String typeDisplay;

    /**
     * @param code
     * @param description
     * @param type
     * @param typeDisplay
     */
    private BusinessType(String code, String description, String type, String typeDisplay) {
        this.code = code;
        this.description = description;
        this.type = type;
        this.typeDisplay = typeDisplay;
    }
    
    /**
     * @param code
     * @return
     */
    public static BusinessType codeOf(String code){
        for(BusinessType businessType : BusinessType.values()){
            if(StringUtils.equals(code, businessType.getCode())) {
                return businessType;
            }
        }
        return null;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * @return the typeDisplay
     */
    public String getTypeDisplay() {
        return typeDisplay;
    }
    
}